/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有，侵权必究！
 */

package io.renren.modules.sys.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.modules.sys.entity.SysRoleEntity;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * 角色管理
 *
 * @author Mark sunlightcs@gmail.com
 */
@Mapper
public interface SysRoleDao extends BaseMapper<SysRoleEntity> {
	

    @Select("select * from sys_role where role_id=#{roleId}")
    @Results({
            @Result(column = "role_id",property = "flhs",many = @Many(select = "io.renren.modules.sys.dao.SysRoleFlhDao.findByRoleId")),
            @Result(column = "role_id",property = "szds",many = @Many(select = "io.renren.modules.sys.dao.SysRoleLocationDao.findByRoleId")),
            @Result(column = "role_id",property = "roleId"),
            @Result(column = "role_name",property = "roleName")
    })
    SysRoleEntity findRoleDetailId(@Param("roleId") Long roleId);
}
